package com.jcj.jcjcache.command;

import com.jcj.jcjcache.core.Command;
import com.jcj.jcjcache.core.JcjCache;
import com.jcj.jcjcache.core.Reply;

public class HmgetCommand implements Command {
    @Override
    public String name() {
        return "HMGET";
    }

    @Override
    public Reply<?> exec(JcjCache cache, String[] args) {
        String key = getKey(args);
        String[] hkeys = getParamsNoKey(args);
        return Reply.array(cache.hmget(key, hkeys));
    }

}
